<!DOCTYPE HTML>
<html>

<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<title></title>

        <script type="text/javascript" src="./jquery-1.4.2.js">
        </script>
        <script type="text/javascript">
        </script>

        <style type="text/css">
        </style>
</head>



<body>
	
	<div id="first"><p>nihao</p><a href="http://www.google.com">google</a></div>
	<div id="second"><p>nihao</p></div>
	<div id="third"><p>nihao</p></div>
	<div class="x"><p>nihao</p></div>
	<div class="x"><p>nihao</p></div>
	<div id="stop">Stop here</div> 
	<div class="x"><p>nihao</p></div>
	<div class="x"><p>nihao</p></div>
	<div class="x"><p>nihao</p></div>
	<span></span>
	<button>Change colors</button>

        <script type="text/javascript">
	$("#first > a").css("background", "black");
	$("div.x").css("background", "black");
	$("div > p").click(function() {
		$(this).slideUp();
	});
	$('<p id="test">My <em>new</em> text</p>').appendTo('body');
	alert($("div").text());

$("button").click(function () { 
$("div").each(function (index, domEle) { 
  // domEle == this 
  $(domEle).css("backgroundColor", "yellow");  
  if ($(this).is("#stop")) { 
  $("span").text("Stopped at div index #" + index); 
  return false; 
  } 
});
});

$("#first").data("test", { first: 16, last: "pizza!" });
alert($("#first").data("test").first);  //16;
alert($("#first").data("test").last);  //pizza!;
        </script>

</body>



</html>

